<template>
	<view>
		<view class="main01">
			<view class="content">
				<view class="list_box">
					<view class="title">途径</view>
					<view class="yob">
						<view class="text">我的积分</view>
					</view>
				</view>
				<view class="but">
					<view class="list_bot">
						<view class="title">转账积分数量</view>
				
					</view>
					<view class="shu"><input type="text" v-model="money" value="" placeholder="请输入转账积分数量" /></view>
				</view>	
				<view class="but">
					<view class="list_bot">
						<view class="title">转账给会员</view>
					</view>
					<view class="shu"><input type="text" v-model="userName" value="" placeholder="请输入会员账号" /></view>
				</view>
				<view class="but">
					<view class="list_bot">
						<view class="title">支付密码</view>
					</view>
					<view class="shu"><input type="password" v-model="pwd" value="" placeholder="请输入支付密码" /></view>
				</view>
				<view class="btn" @click="go">转账</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				money:'',
				userName:'',
				pwd:''
			}
		},
		methods: {
			 go(){
				 let that = this;
				 if(!!!Number(that.money) || Number(that.money) < 0)
				 {	
				 	that.Msg.Fail('请输入正确转账积分数量')
				 	return
				 }
				 if(that.userName == '')
				 {
				 	that.Msg.Fail('请输入对方会员账户')
				 	return
				 }
				 if(that.pwd == '')
				 {
				 	that.Msg.Fail('请输入支付密码')
				 	return
				 }
				 this.Net._get('zzb',{name:that.userName,money:that.money,pwd:that.pwd },(res)=>{
				 	if(res.code ==1){
				 		//console.log(res.data)
				 		that.Msg.Success('转账成功', (res) => {
				 			uni.navigateBack({
				 				delta: 1
				 			})
				 		})
				 	}
				 });
			 },
			gotopage(e){
				let url = e.currentTarget.dataset.url;		
				uni.navigateTo({
					url:url
				})
			}
			
		}
	}
</script>

<style>
	page{ background-color: #fff;}
.main01{
	width: 100%;
}
.main01 .nav{ width: 100%;  display: flex; 
height: 12vw;
line-height: 12vw;
background-color: #f7f8fa;
}
.main01 .tab01{ width: 50%; font-size: 4vw; color: #232429; text-align: center;}
.main01 .selected01{
	font-size: 4vw !important;
	color: #fc493a !important;
	font-weight: bold !important;
}
.line{
	width: 10vw;
	border-radius: 10px;
	height: 3px;
	background-color: rgba(0,0,0,0);
	margin-left: calc(50% - 5vw);
}
.xian01{
	background-color: #fc493a !important;
	border-radius: 10vw !important;
}
.main01 .content{
	width: 92%;
	display: inline-block;
	box-shadow: 0 0  10rpx #d6d6d6;
	padding: 30rpx 30rpx;
	margin-top: 8vw;
	margin-left: 4%;
	border-radius: 15rpx;
}
.main01 .list_box{
	width: 100%;
	display: flex;
	justify-content: space-between;
	border-bottom: 1px solid #e7eaf1;
	height: 14vw;
	line-height: 14vw;
}
.main01 .list_box .title{
	font-size: 3.5vw;
	color: #333;
	font-weight: bold;
}
.main01 .list_box .yob{
	display: flex;
	color: #454546;
	font-size: 3.5vw;
	
}
.main01 .but{
	width: 100%;
	border-bottom: 1px solid #e7eaf1;
	margin-top: 5vw;
	display: inline-block;
}
.main01 .but .list_bot{
	width: 100%;
	display: flex;
	justify-content: space-between;
	height: 8vw;
	line-height: 8vw;
}
.main01 .but .list_bot .title{
	font-size: 3.5vw;
	color: #333;
	font-weight: bold;
}
.main01 .but .list_bot .yob{
	display: flex;
	color: #aaaaac;
	font-size: 3.5vw;
	
}
.main01 .shu input{
	font-size: 4vw;
	color: #666;
	height: 7vw;
	line-height: 7vw;
}
.btn {
	width: 92%;
	height: 11vw;
	background:#4d726f;
	color: #fff;
	font-size: 4vw;
	border-radius: 5vw;
	text-align: center;
	line-height: 11vw;
	margin-top: 5vh;
	margin-left: 4%;
}
</style>
